package net.codesree.dao;

import java.io.Serializable;

public class Query implements Serializable {

  private Query(QueryBuilder queryBuilder) {}
  
  public enum KEYWORDS {
    SELECT="SELECT";
    UPDATE="UPDATE";
    DELETE="DELETE";
    INSERT="INSERT";
    INTO="INTO";
    ALL="*";
    COUNT="COUNT(*)";
    OPEN_BRACKET="(";
    CLOSE_BRACKET=")";
    FROM="FROM";
    WHERE="WHERE";
    LESS_THAN="<";
    MORE_THAN=">";
    NOT="!";
    EQUAL_TO="=";
    IN="IN";
    GROUP_BY="GROUP BY";
    ORDER_BY="ORDER BY";
    ORDER_DESC="DESC";
    ORDER_ASC="ASC";
    LIMIT="{0},{1}";
  }
  
  public static class QueryBuilder {
  
    public QueryBuilder() {}
    
    public QueryBuilder select(String[] cols) {
	  return this;
	}
	
	public QueryBuilder from(String tableName,String aliasName) {
	  return this;
	}
	
	public QueryBuilder where(String[] cols,Object[] params) {
	  return this;
	}
	
	public QueryBuilder insert(String[] cols,Object[] params) {
	  return this;
	}
	
	public QueryBuilder update(String tableName,String[] cols,Object[] params) {
	  return this;
	}
	
	public QueryBuilder delete(String tableName) {
	  return this;
	}
	
	public QueryBuilder notEqualTo(String colName,Object paramVal) {
	  return this;
	}
	
	public QueryBuilder equalTo(String colName,Object paramVal) {
	  return this;
	}
	
	public QueryBuilder moreThan(String colName,Object paramVal) {
	  return this;
	}
	
	public QueryBuilder lessThan(String colName,Object paramVal) {
	  return this;
	}
	
	public QueryBuilder hasIn(String colName,Object[] params) {
	  return this;
	}
	
	public QueryBuilder count() {
	  return this;
	}
	
	public QueryBuilder groupBy(String[] colNames) {
	  return this;
	}
	
	public QueryBuilder orderBy(String[] colNames) {
	  return this;
	}
	
	public QueryBuilder orderAsc(String colName) {
	  return this;
	}
	
	public QueryBuilder orderDesc(String colName) {
	  return this;
	}
	
	public QueryBuilder limit(int offSet,int numOfRows) {
	  return this;
	} 
    
    public Query build() {
	  return new Query(this);
	}
  }

}
